
.PHONY:all clean dist_clean

DependFile:=rcS 
DependFile += $(shell ls S[0-9]*)

all:init.tgz

init.tgz:$(DependFile)
	mkdir -p usr/etc/rc.d/run
	cp rcS usr/etc/rc.d
	chmod +x usr/etc/rc.d/rcS
	cp S[0-9]* usr/etc/rc.d/run
	chmod +x usr/etc/rc.d/run/*
	tar czf init.tgz usr
	rm -fr usr

clean:
	rm -fr usr *.tgz

dist_clean:clean
	
